public class InfoManager extends Object
MenuAreaButton
buttons in the
application tab menu that are connected to the application in general (information about
the system and global settings).
It is used by the Controller that delegates to this class the implementation of the actions
connected to these MenuAreaButton
buttons.
The Controller receives the user'choice by the relative listener and call the right method of this class.
MenuAreaButton
,
EventLogManagerController
Modifier and Type | Field and Description |
---|---|
private EventLogManagerController |
elmController
The
EventLogManagerController element
that represents the Controller of the application
and that is the one that uses this editor manager. |
private EventLogManagerModel |
elmModel
The
EventLogManagerModel element
that represents the Model of the application managed
by the Controller. |
private EventLogManagerView |
elmView
The
EventLogManagerView element
that represents the View of the application managed
by the Controller. |
Constructor and Description |
---|
InfoManager(EventLogManagerController elmController)
Constructs a new
InfoManager , with the EventLogManagerController
passed as parameter associated to it. |
Modifier and Type | Method and Description |
---|---|
private JPanel |
createElmPanel(ActionListener listener)
This method defines the structure of the second tab content in the main panel.
|
private JPanel |
createXesPanel(ActionListener listener)
This method defines the structure of the first tab content in the main panel.
|
void |
showAbout()
This method opens the application credits (About).
|
void |
showSettings(ActionListener listener)
This method creates a settings panel where to show the editable settings
and were the user can change them, applying the edits, or resets them,
restoring their default values.
|
private EventLogManagerController elmController
EventLogManagerController
element
that represents the Controller of the application
and that is the one that uses this editor manager.EventLogManagerController
private EventLogManagerView elmView
EventLogManagerView
element
that represents the View of the application managed
by the Controller.
We set this reference to the View managed by the Controller from the
getView()
method of the EventLogManagerController
.
EventLogManagerView
private EventLogManagerModel elmModel
EventLogManagerModel
element
that represents the Model of the application managed
by the Controller.
We set this reference to the Model managed by the Controller from the
getModel()
method of the EventLogManagerController
.
EventLogManagerModel
public InfoManager(EventLogManagerController elmController)
InfoManager
, with the EventLogManagerController
passed as parameter associated to it.
The passed Controller is the one that uses this InfoManager
class. This class
uses this reference to the Controller to communicate with it, calling some of its methods.
This class is delegated by the Controller to implement some operations, for this reason it is able to call the View and the Model managed by the Controller directly on behalf of the Controller to handle this operation correctly.
elmController
- the EventLogManagerController
object that represents the Controller and uses this EditorManager
EventLogManagerView
,
EventLogManagerController
,
EventLogManagerModel
public void showSettings(ActionListener listener)
Then it asks the View to show it and the passed listener to manage the user actions.
listener
- the ActionListener
that will manage the user actions on the panel buttonsprivate JPanel createXesPanel(ActionListener listener)
It will add the passed listener to the panel buttons to manage them.
listener
- the ActionListener
that will manage the panel buttonsJPanel
that represents the content of the first tab of the settings menuprivate JPanel createElmPanel(ActionListener listener)
It will add the passed listener to the panel buttons to manage them.
listener
- the ActionListener
that will manage the panel buttonsJPanel
that represents the content of the second tab of the settings menupublic void showAbout()